package src;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Recommender {


	public static void user_input()
	{
		try
		{
			//Assumptions
			int a1, a2, a3;
			String a4;
			
			//Values required from the user
			System.out.println("Enter info");
			System.out.println("1. Locality (Drop down to choose from values in database + Others) ");	//a1
			System.out.println("2. Age group(Choose age group from drop down)");						//a2
			System.out.println("3. Gender (chose + one if user doesnt want to tell) ");					//a3
			System.out.println("4. Fav channel (similar to which videos are required) ");				//a4
			
			//pass input to another function which compares values to the existing database
			
		}catch(Exception e)
		{
			System.out.println("Error contacting Youtube!!");
		}
	}
	
	
	//Recommend 10 videos to the user
	public static void recommend() //pass values here calculated from the drop down menus
	{
		//Assumptions
		int locality, age_group=2, a3;
		String a4;
		String loyalty = "Jaja";
		
		//Search for a4 in database -> check if loyalty
		
		//Loyalty cluster
		if(loyalty!=null)
		{
			//more videos from this channel are to be recommended
		}
		
		//Age groups Cluster
		if (age_group == 1)
		{
			//SQL Select 3
		}else if (age_group==2)
		{
			//SQL Select 3
		}else
		{
			//SQL Select 3
		}
		
		//Location Cluster
		//SQL for locality search in database, to find videos in similar to the ones given by the user. Select 2
		
		//Gender
		//Search for gender. Select 2
		
		
	
	}
	
	
	//If manually values are required from the user
	public static String input_num()
	{
		String S = null;
		BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
		try
		{
			S=br.readLine();
		}
		catch(Exception exp)
		{
			System.out.println("Error!");
		}
		return S;
	}
	
	public static int input_string()
	{
		int a=0;
		BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
		try
		{
			a=Integer.parseInt(br.readLine());
		}
		catch(Exception exp)
		{
			System.out.println("Error!");
		}
		return a;
	}
	
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		input_string();
	}

}
